{extend name="common:base" /}

{block name="main"}
<style>
    .aaa:hover{
        transform: scale(1.5);
    }
</style>
<!--body wrapper start-->
<div class="wrapper">
    <div class="pull-left">
        <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
    </div>
    <div class="row">
        <div class="col-md-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb panel">
                <li><a href="{:url('Index/index')}"><i class="fa fa-home"></i> 控制台</a></li>
                <li><a href="{:url('index')}">房间管理</a></li>
                <li class="active">申请创建房间列表</li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <div class="panel-body">
                    <form class="ids" action="" method="post">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>手机</th>
                                <th>昵称</th>
                                <th>内容</th>
                                <th>时间</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='data' id='v'}
                            <tr>
                                <td>{$v.id}</td>
                                <td>{$v.mobile}</td>
                                <td>{$v.nickname}</td>
                                <td>申请创建房间</td>
                                <td>{$v.create_at}</td>
                                <td>{if $v.status==1}审核中{elseif $v.status==2}成功{elseif $v.status==3}失败{/if}</td>
                                <td>
                                    {if ($v.status == 1)}
                                        <a href="#"   class="btn btn-success ajax-get" onclick="shenhe(2,'{$v.uid}','{$v.id}')" title="充值审核">通过</a>
                                        <a href="#"  class="btn btn-danger ajax-get"   onclick="shenhe(3,'{$v.uid}','{$v.id}')" title="充值审核">不通过</a>
                                    {/if}
                                </td>
                            </tr>
                            {/volist}

                            </tbody>
                        </table>
                    </form>

                </div>
            </section>
            {$page}
        </div>

    </div>
</div>
<script type="text/javascript" src="__JS__/layer/layer.js"></script>
<script type="text/javascript">
    function shenhe(type,uid,id) {
        $.ajax({
            type: "post",
            url: "{:url('edit_create_room_status')}",
            data: {'type':type,'uid':uid,'id':id},
            dataType: "json",
            async: false,
            success: function(data) {
                var msg = data.msg;
                layer.msg(msg,{icon:6,time:1000});
                setTimeout(function(){
                    location.reload()},1000
                );
            }
        });

    }
</script>
<!--body wrapper end-->
{/block}
